import request from "@/lib/request/axios";

// TODO 账号密码登录
export const doLoginApi = (params) => {
	return request.post("/auth/b/doLogin", params);
};
// 首页菜单
export const menuTreeSelectorApi = (params) => {
	return request.get("/sys/userCenter/loginMobileMenu", params);
};
// 获取请假信息
export const openStartApprove = (params) => {
	return request.get("/biz/dailyHolidayApprove/openStartApprove", params);
};
// 添加请假申请表
export const dailyHolidayApproveAdd = (params) => {
	return request.post("/biz/dailyHolidayApprove/add", params);
};
// 获取请假记录
export const dailyHolidayApproveList = (params) => {
	return request.get("/biz/dailyHolidayApprove/page", params);
};
// 获取打卡设置详情
export const dailyTimeclockConfig = (params) => {
	return request.get("/biz/dailyTimeclockConfig/detail", params);
};
// 打卡 
export const dailyTimeClock = (params) => {
	return request.post("/biz/mobile/dailyTimeClock/add", params);
};

// 打卡日统计
export const OpenTimeClockStatisticsDay = (params) => {
	return request.get("/biz/mobile/dailyTimeClock/openTimeClockStatisticsDay", params);
};

// 打卡周月统计
export const openWeekMonth = (params) => {
	return request.get("/biz/mobile/dailyTimeClock/openTimeClockStatisticsWeekMonth", params);
};

// 周月打卡明细
export const openWeekMonthDetail = (params) => {
	return request.get("/biz/mobile/dailyTimeClock/OpenTimeClockDetailWeekMonth", params);
};
// 打开打卡页面
export const OpenTimeClock = (params) => {
	return request.get("/biz/mobile/dailyTimeClock/openTimeClock", params);
};
// 获取加班信息
export const openStartApproveOverwork= (params) => {
	return request.get("/biz/dailyOverworkApprove/openStartApprove", params);
};
// 添加加班申请表
export const dailyOverworkApproveAdd = (params) => {
	return request.post("/biz/dailyOverworkApprove/add", params);
};
// 获取加班列表 
export const dailyOverworkApproveList = (params) => {
	return request.get("/sys/flwProcessInstance/openRecord", params);
}; 
// 获取请假详情
export const dailyHolidayApproveDetail = (params) => {
	return request.get("/biz/dailyHolidayApprove/detail", params);
};
// 获取加班详情
export const dailyOverworkApproveDetail = (params) => {
	return request.get("/biz/dailyOverworkApprove/detail", params);
};
// 周月假勤明细
export const openApproveDetailWeekMonthDetail = (params) => {
	return request.get("/biz/dailyHolidayApprove/openApproveDetailWeekMonth", params);
}; 
// 周月加班明细


export const overworkDetailWeekMonthDetail = (params) => {
	return request.get("/biz/dailyOverworkApprove/openApproveDetailWeekMonth", params);
}; 
 
// 调入调出
// 新单位列表
export const pageWithFront = (params) => {
	return request.get("/biz/org/pageWithFront?current=1&size=1000&category=YARD", params);
}; 
// 新部门列表
export const pageOrg = (params) => {
	return request.get("/biz/org/page?current=1&size=1000", params);
}; 
// 新职级列表
export const pagePosition = (params) => {
	return request.get("/biz/position/list?current=1&size=1000", params);
}; 
// 调动原因
// export const pagePosition = (params) => {
// 	return request.get("/biz/position/list?current=1&size=1000", params);
// }; 
// 提交调动
export const dailyTransferApproveAdd = (params) => {
	return request.post("/biz/dailyTransferApprove/add", params);
}; 
// 调动记录
export const dailyTransferApprovePage = (params) => {
	return request.get("/biz/dailyTransferApprove/page", params);
}; 

// 调动详情
export const dailyTransferApproveDetail = (params) => {
	return request.get("/biz/dailyTransferApprove/detail", params);
}; 
 
// 撤销申请
export const flwRevoke = (params) => {
	return request.post("/sys/flw/revoke", params);
}; 

// 我的审批   
export const approvalPage = (params) => { 
	return request.get("/sys/flwProcessInstance/openRecord", params);
}; 

// 我的审批详情 
export const approvalDetail = (params) => { 
	return request.get("/sys/flwProcessInstance/detail", params);
}; 

//我的审批 调动记录
export const approvaMobilizelPage = (params) => { 
  return request.get("/biz/dailyTransferApprove/page?"+str, params);
}; 

// 审批通过
export const flwPass = (params) => { 
	return request.post("/sys/flw/pass", params);
}; 

// 审批拒绝
export const flwReject = (params) => { 
	return request.post("/sys/flw/reject", params);
}; 
// 通知公告全部列表

export const dailyNoticePage = (params) => { 
	return request.get("/biz/dailyNotice/page", params);
}; 
 

 // 信息公示
 export const dailyInformationOpenPage = (params) => {
 	return request.get("/biz/dailyInformationOpen/page", params);
 };  
 

 // 信息公示详情
 export const dailyInformationOpenDetail = (params) => {
 	return request.get("/biz/dailyInformationOpen/detail", params);
 }; 
 // 信息公示已读
 export const dailyInformationOpenRead = (params) => {
 	return request.post("/biz/dailyInformationOpen/read", params);
 }; 
 // 通知详情
 export const dailyNoticeDetail = (params) => {
 	return request.get("/biz/dailyNotice/detail", params);
 }; 
 // 通知已读详情
 export const readeDldailyNotice = (params) => {
 	return request.post("/biz/dailyNotice/read", params);
 }; 
// TODO 获取字典表
export const getDictTreeListApi = (params) => {
	return request.get("/dev/dict/listByDictValue ", params);
};

// TODO 通讯录
export const userBook = (params) => {
	return request.get("/biz/user/userBook", params);
};





// TODO 获取字典表
export const getDictTreeApi = (params) => {
	return request.get("/dev/dict/tree", params);
};





// TODO 手机号登录
export const doLoginByPhoneApi = (params) => {
	return request.post("/auth/b/doLoginByPhone ", params);
};
// TODO 注册 获取短信验证码
export const getSignUpGetPhoneValidCodeApi = (params) => {
	return request.post("/sys/userCenter/signUpGetPhoneValidCode", params);
};
// TODO 登录 获取短信验证码
export const getPhoneValidCodeApi = (params) => {
	return request.get("/auth/b/getPhoneValidCode", params);
};
// TODO 找回密码 获取短信验证码
export const findPasswordGetPhoneValidCodeApi = (params) => {
	return request.get("/sys/userCenter/findPasswordGetPhoneValidCode", params);
};
// TODO 登录 找回密码
export const findPasswordByPhoneApi = (params) => {
	return request.post("/sys/userCenter/findPasswordByPhone", params);
};
// TODO 登录 通过手机号注册用户
export const signUpByPhonApi = (params) => {
	return request.post("/sys/userCenter/signUpByPhone", params);
};
// TODO 获取当前登录用户相关信息
export const getLoginUserApi = (params) => {
	return request.get("/auth/b/getLoginUser", params);
};
// TODO 获取省份
export const getProvApi = (params) => {
	return request.get("/biz/area/prov", params);
};
// TODO 获取城市
export const getCityApi = (params) => {
	return request.get("/biz/area/city", params);
};

// TODO 获取部门信息
export const getDeptSelectorrApi = (params) => {
	return request.post("/sys/dept/selector", params);
};
// TODO 获取陪同领导
export const getAccompanyLeaderApi = (params) => {
	return request.get("/biz/user/accompanyLeader", params);
};
// TODO 预约 获取预约展示日
export const getReServationDateApi = (params) => {
	return request.get("/biz/reservation/getDate", params);
};
// TODO 预约 获得已预约时间信息 外部
export const getReservationDateOutApi = (params) => {
	return request.get("/biz/reservation/getReservationDateOut", params);
};
// TODO 预约 获得已预约时间信息 内部
export const getReservationDateInApi = (params) => {
	return request.get("/biz/reservation/getReservationDate", params);
};
// TODO 预约 获得不可预约时间信息 -内部
export const getNoReServationDateApi = (params) => {
	return request.get("/biz/reservation/getNoDate", params);
};
// TODO 预约 获得不可预约时间信息 -社会
export const getNoOutReServationDateApi = (params) => {
	return request.get("/biz/reservation/getNoDateOut", params);
};
// TODO 预约 获得本月已预约时间信息
export const getThisMonthReServationDateApi = (params) => {
	return request.get("/biz/reservation/thisMonth/getReservationDate", params);
};
// TODO 预约 获得本月不可预约时间信息
export const getThisMonthNoReServationDateApi = (params) => {
	return request.get("/biz/reservation/no", params);
};
// TODO 预约 查询某天预约时间段：
export const getRecordSomeDayApi = (params) => {
	return request.post("/biz/reservation/recordSomeDay", params);
};
// TODO 预约 社会用户
export const addOutReservationApi = (params) => {
	return request.post("/biz/reservation/addOut", params);
};
// TODO 重新预约 社会用户
export const reOutReservationApi = (params) => {
	return request.post("/biz/reservation/reOut", params);
};
// TODO 预约
export const addReservationApi = (params) => {
	return request.post("/biz/reservation/add", params);
};
// TODO 预约 编辑
export const editReservationApi = (params) => {
	return request.post("/biz/reservation/edit", params);
};
// TODO 重新预约
export const reReservationApi = (params) => {
	return request.post("/biz/reservation/re", params);
};
// TODO 客户情况填写
export const informationFillApi = (params) => {
	return request.post("/biz/reservation/informationFill", params);
};
// TODO 获取tab栏
export const getOwnStatusFlagApi = (params) => {
	return request.get("/sys/role/ownStatusFlag", params);
};
// TODO 获取预约表列表
export const getReservationPageApi = (params) => {
	return request.get("/biz/reservation/page", params);
};
// TODO 获取预约表列表详情
export const getReservationDetailApi = (params) => {
	return request.get("/biz/reservation/detail", params);
};
// TODO 获取预约表列表详情-审核记录
export const getreservationLogPageApi = (params) => {
	return request.get("/biz/reservationLog/page", params);
};
// TODO 预约表 取消预约
export const getReservationCancellApi = (params) => {
	return request.post("/biz/reservation/cancel", params);
};
// TODO 预约表 通过审核
export const getReservationPasslApi = (params) => {
	return request.post("/biz/reservation/pass", params);
};
// TODO 预约表 驳回审核
export const getReservationRefuselApi = (params) => {
	return request.post("/biz/reservation/refuse", params);
};
// TODO 预约表 评价
export const getReservationjudgelApi = (params) => {
	return request.post("/biz/reservation/judge", params);
};
// TODO 预约表 参观完成
export const completeOutApi = (params) => {
	return request.post("/biz/reservation/completeOut", params);
};
